import Vue from 'vue'
import VueRouter from 'vue-router'

const Home = () => import('@/views/Home');
const Note = () => import('@/views/Note');
const Demo = () => import('@/views/Demo');
const About = () => import('@/views/About');



Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: "/home",
    name: 'Home',
    component: Home
  },
  {
    path: '/note',
    name: 'Note',
    component: Note
  },
  {
    path: "/demo",
    name: 'Demo',
    component: Demo
  },
  {
    path: "/about",
    name: "About",
    component: About
  },
  {
    path: "/admin",
    name: "Admin",
    component: Home
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
